﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="admin_vote.aspx.cs" Inherits="Master_admin_vote" %>
<%@ Import Namespace="AspNetCs.Enumerations" %>
<%@ Import Namespace="AspNetCs.Enumerations.VoteEnum" %>
<%@ Import Namespace="AspNetCs.Common" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
        <link href="Css/Css.css" rel="stylesheet" type="text/css" /> 
        <script language="javascript" src="../Script/formValidator/jquery_last.js" ></script>
        <script language="javascript" src="../Script/public.js" ></script>
</head>
<body>

<form id="Form1" runat="server" >
    <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align=center>
  <tr>
	<td colspan="2" align="center" class="title"><strong>网 站 调 查 管 理</strong></td>
  </tr>
  <tr class="tdbg"> 
    <td width="70" height="30"><strong>管理导航：</strong></td>
    <td height="30"><a href="Admin_Vote.Aspx?action=Add">添加调查</a>&nbsp;|&nbsp;<a href="Admin_Vote.Aspx">所有调查</a></td>
  </tr>
</table>
    <asp:MultiView ID="MultiView1" runat="server">
    <asp:View ID="View1" runat="server">
                  
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" Class="border">
    <tr class="title">
      <td  height="30" align="center">选择</td>
      <td  height="30" align="center">ID</td>
      <td  height="30" align="center">主题</td> 
      <td  height="30" align="center">添加时间</td> 
      <td  height="30" align="center">调查选项</td> 
      <td  height="30" align="center">最新调查</td> 
      <td  height="30" align="center">操作</td> 
      
          </tr>
    <asp:Repeater ID="Repeater1" runat="server" 
        onitemdatabound="Repeater1_ItemDataBound" 
        onitemcommand="Repeater1_ItemCommand" >
        <ItemTemplate>
             <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#cccccc'" style="padding: 0px 2px;">
              <td height="30" align="center">
              <input type="checkbox" id="VoteID" name="VoteID" value="<%#Eval("id") %>" />
             </td>
              <td  align="center" ><%#Eval("id") %></td>
              <td  align="center" ><%#Eval("title") %></td>
      <td  height="30" align="center"><%#Eval("addtime") %></td> 
      <td  height="30" align="center"><%#EnumDescription.GetFieldText((VoteTypeEnum)StringHelper.isNumber_int(Eval("VoteType"))) %></td> 
              <td  align="center" ><%#Eval("isnew").ToString()=="0"?"否":"<span style='color:blue'>是</span>" %></td>
              <td  align="center" >
                  <asp:LinkButton ID="LinkButton1" CommandArgument='<%#Eval("id") %>'  CommandName="modify" runat="server">修改</asp:LinkButton>&nbsp;&nbsp;&nbsp; <asp:LinkButton ID="LinkButton2"   CommandArgument='<%#Eval("id") %>'  CommandName="delete"    OnClientClick="javascript:return confirm('是否真的删除此条调查信息???\n\n一旦删除将无法恢复!')" runat="server">删除</asp:LinkButton></td>
              
              
             </tr>
        </ItemTemplate>
        <FooterTemplate>
            <asp:Panel ID="pl_nothing" runat="server" Visible="false">
                   <tr  class="tdbg" ><td colspan="9">
                            <br /><center>暂时没有任何调查信息</center><br />
                   </td></tr> 
            </asp:Panel>
        </FooterTemplate>
    </asp:Repeater>  
    <tr class="tdbg"><td colspan="9" style="padding:5px; text-align:right;" >
    <input type="checkbox" name="checkedAll" id="checkedAll" onclick="checkBoxAll('VoteID')" />全选/取消&nbsp;&nbsp;&nbsp;<asp:LinkButton 
            ID="LinkButton1"  CommandName="deleteAll"    
            OnClientClick="javascript:return confirm('是否真的删除选中的调查信息???\n\n一旦删除将无法恢复!')"  
            runat="server" oncommand="LinkButton1_Command"><span style='color:Red;'>删除选中信息</span></asp:LinkButton>
    
    </td></tr>

    </table>
    
    </asp:View>


<asp:View ID="View2" runat="server">
   <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align="center">
            <tr>
                <td colspan="2" align="center" class="title">
                    <strong>
                        <%=TextChange%>网站调查信息</strong>
                </td>
            </tr>
            <tr class="tdbg">
                <td width="300" height="25">
                    <strong>调查标题：</strong>
                </td>
                <td height="25">
                    <asp:TextBox ID="Title" runat="server" Width="305px"></asp:TextBox>
                    <br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="Title" Display="Dynamic" ErrorMessage="请输入调查的标题"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr class="tdbg">
                <td width="300" height="25" valign="middle">
                    <strong>选项1：</strong>
                </td>
                <td height="25">
                    <asp:TextBox ID="Select1" runat="server" Width="192px"></asp:TextBox>&nbsp;投票数:<font 
                        color="#FF6600"><asp:TextBox ID="SumNum1" runat="server" Height="16px" 
                        Width="50px">0</asp:TextBox>
                    </font>
                </td>
            </tr>
            
            
            <tr class="tdbg">
                <td width="300" height="25" valign="middle">
                    <strong>选项2：</strong>
                </td>
                <td height="25">
                    <asp:TextBox ID="Select2" runat="server" Width="192px"></asp:TextBox>&nbsp;投票数:<font 
                        color="#FF6600"><asp:TextBox ID="SumNum2" runat="server" Height="16px" 
                        Width="50px">0</asp:TextBox>
                    </font>
                </td>
            </tr>
            
       
                  <tr class="tdbg">
                <td width="300" height="25" valign="middle">
                    <strong>选项3：</strong>
                </td>
                <td height="25">
                    <asp:TextBox ID="Select3" runat="server" Width="192px"></asp:TextBox>&nbsp;投票数:<font 
                        color="#FF6600"><asp:TextBox ID="SumNum3" runat="server" Height="16px" 
                        Width="50px">0</asp:TextBox>
                    </font>
                </td>
            </tr>
            
       
                  <tr class="tdbg">
                <td width="300" height="25" valign="middle">
                    <strong>选项4：</strong>
                </td>
                <td height="25">
                    <asp:TextBox ID="Select4" runat="server" Width="192px"></asp:TextBox>&nbsp;投票数:<font 
                        color="#FF6600"><asp:TextBox ID="SumNum4" runat="server" Height="16px" 
                        Width="50px">0</asp:TextBox>
                    </font>
                </td>
            </tr>
            
       
                  <tr class="tdbg">
                <td width="300" height="25" valign="middle">
                    <strong>选项5：</strong>
                </td>
                <td height="25">
                    <asp:TextBox ID="Select5" runat="server" Width="192px"></asp:TextBox>&nbsp;投票数:<font 
                        color="#FF6600"><asp:TextBox ID="SumNum5" runat="server" Height="16px" 
                        Width="50px">0</asp:TextBox>
                    </font>
                </td>
            </tr>
            
       
                  <tr class="tdbg">
                <td width="300" height="25" valign="middle">
                    <strong>选项6：</strong>
                </td>
                <td height="25">
                    <asp:TextBox ID="Select6" runat="server" Width="192px"></asp:TextBox>&nbsp;投票数:<font 
                        color="#FF6600"><asp:TextBox ID="SumNum6" runat="server" Height="16px" 
                        Width="50px">0</asp:TextBox>
                    </font>
                </td>
            </tr>
            
       
                  <tr class="tdbg">
                <td width="300" height="25" valign="middle">
                    <strong>选项7：</strong>
                </td>
                <td height="25">
                    <asp:TextBox ID="Select7" runat="server" Width="192px"></asp:TextBox>&nbsp;投票数:<font 
                        color="#FF6600"><asp:TextBox ID="SumNum7" runat="server" Height="16px" 
                        Width="50px">0</asp:TextBox>
                    </font>
                </td>
            </tr>
            
       
                  <tr class="tdbg">
                <td width="300" height="25" valign="middle">
                    <strong>选项8：</strong>
                </td>
                <td height="25">
                    <asp:TextBox ID="Select8" runat="server" Width="192px"></asp:TextBox>&nbsp;投票数:<font 
                        color="#FF6600"><asp:TextBox ID="SumNum8" runat="server" Height="16px" 
                        Width="50px">0</asp:TextBox>
                    </font>
                </td>
            </tr>
            
                  
            
            
            
            
            <tr class="tdbg">
                <td width="300" height="25">
                    <strong>是否最新：</strong>
                </td>
                <td height="25" valign="middle">
                    <asp:RadioButtonList ID="isnew" runat="server" RepeatColumns="3">
                        <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                        <asp:ListItem Value="0">否</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr class="tdbg">
                <td height="25" width="300">
                    <strong>调查选项：</strong></td>
                <td height="25" valign="middle">
                    &nbsp;<asp:DropDownList ID="VoteType" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr class="tdbg">
                <td align="center" colspan="2" height="40">
                    <input id="Action" name="Action" type="hidden" value="SaveModify">
                        <asp:HiddenField ID="CurrID" runat="server" />
                        <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" 
                        Style="cursor: hand; background-color: #cccccc;" Text="  确     定  " />
                        &nbsp;<asp:Button ID="Button1" runat="server" OnClick="Button1_Click1" 
                        Style="cursor: hand; background-color: #cccccc;" Text="  修    改  " />
                    </input>
                </input>
                </td>
            </tr>
    </table></asp:View></asp:MultiView></form></body></html>